//
//  InfoTableView.m
//  ZzzzyManProject
//
//  Created by mac on 16/3/5.
//  Copyright © 2016年 ZzzzyMan@. All rights reserved.
//

#import "InfoTableView.h"
#import "UserInfoController.h"
#import <SDImageCache.h>
#import <SDWebImageManager.h>
#import <MBProgressHUD.h>
#import "UserInfo.h"

@implementation InfoTableView



- (NSArray *)getGroups {
    
    //第一组
    InfoItem * item11 = [InfoItemArrow infoItemWithIconName:@"info" andTitle:@"账户信息详情" andController:[UserInfoController class]];
    InfoGroup * group1 = [InfoGroup infoGroupWithItems:@[item11]];
    
    //第二组
    InfoItem * item21 = [InfoItemArrow infoItemWithIconName:@"clean" andTitle:@"清除缓存" andOption:^{
        [[NSNotificationCenter defaultCenter] postNotificationName:@"cleanCache" object:nil];
    }];
    
    InfoGroup * group2 = [InfoGroup infoGroupWithItems:@[item21]];
    
    //第三组
    InfoItem * item31 = [InfoItemSwitch infoItemWithIconName:@"messages" andTitle:@"推送与提醒"];
    InfoGroup * group3 = [InfoGroup infoGroupWithItems:@[item31]];
    
    //第四组
    InfoItem * item41 = [InfoItemArrow infoItemWithIconName:@"share" andTitle:@"分享给朋友" andOption:^{
        [[NSNotificationCenter defaultCenter] postNotificationName:@"mobShare" object:nil];
    }];
    InfoItem * item42 = [InfoItemArrow infoItemWithIconName:@"proposal" andTitle:@"反馈" andOption:^{
    
    }];
    InfoGroup * group4 = [InfoGroup infoGroupWithItems:@[item41,item42]];
    
    //第五组
    InfoItem * item51 = [InfoItemArrow infoItemWithIconName:@"logOff" andTitle:@"退出登陆" andOption:^{
 
            [[NSNotificationCenter defaultCenter] postNotificationName:@"logOff" object:nil];
    
    }];
    
    InfoGroup * group5 = [InfoGroup infoGroupWithItems:@[item51]];
    return @[group1,group2,group3,group4,group5];
    
}


@end
